<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    body {}

    /* .box1 {
        /* width: 400px;
        height: 400px; */
    /* transition: all 3s;
    border: 2px solid black;

    } */
    img {
        display: block;
        transition: all 1s;
    }

    img:hover {
        /* transform: rotateX(360deg); */
        /* transform: rotateY(180deg); */
        /* transform: rotateZ(180deg); */
    }

    .box {
        position: relative;
        width: 200px;
        height: 200px;
        margin: 100px auto;
        perspective: 500px;
        transition: all 1s;
        /* 开启3d空间 */
        transform-style: preserve-3d;

    }

    .box:hover {
        transform: rotateY(60deg);
    }

    .box div {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: pink;

    }

    .box div:last-child {
        background-color: purple;
        transform: rotateX(60deg);
    }
</style>

<body>

    <img src="../images/dog.jpg" alt="">
    <div class="box">
        <div></div>
        <div></div>
    </div>
    <script>
        //3D
        //1. translate z轴 后面单位我们一般用px
        // translate 里的x,y,z不能省略 搭配透视使用(写到被观察元素的父盒子上)
        // 
    </script>
</body>

</html>